//
//  Mine_ProgrammeTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 2016/10/27.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Mine_ProgrammeTableViewCell.h"

@implementation Mine_ProgrammeTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.circle = [[UIView alloc] init];
    self.circle.layer.cornerRadius = 2.5;
    self.circle.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.circle];
    
    self.time = [[UILabel alloc] init];
    self.time.text = @"08:59";
    self.time.textColor = [UIColor grayColor];
    self.time.font = [UIFont systemFontOfSize:16.0f];
    [self.contentView addSubview:self.time];
    
    self.detail = [[UILabel alloc] init];
    self.detail.text = @"提示事件";
    self.detail.textColor = [UIColor grayColor];
    self.detail.font = [UIFont systemFontOfSize:16.0f];
    [self.contentView addSubview:self.detail];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.circle.frame = CGRectMake(15, 30 - 2.5, 5, 5);
    
    self.time.frame = CGRectMake(CGRectGetMaxX(self.circle.frame) + 5, 20, 60, 20);
    
    self.detail.frame = CGRectMake(CGRectGetMaxX(self.time.frame), 20, SCREEN_WIDTH - CGRectGetMaxX(self.time.frame) - 10, 20);
}




@end
